package demo.database.hsqldb;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.sql.DataSource;

import org.sql2o.GenericDatasource;


/**
 *
 *
 * @author Administrator
 *
 */
public class MemoryOnlyDBManager {
    public static Connection getConnection() throws SQLException {
        Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", "");
        return c;
    }
    
    
    public static DataSource getDataSource() {
        return new GenericDatasource("jdbc:hsqldb:mem:aname", "sa", "");
    }
}

